Skip to content

feat(workflow,sql-editor): add DBA sample workflows and enhance pipe/SQL editor UX - #647

Merged
huyplb merged 2 commits into
mainfrom
feat/workflow-dba-and-editor-ux
Nov 25, 2026
Merged

huyplb merged 2 commits into
mainfrom
feat/workflow-dba-and-editor-ux

Conversation

@huyplb

@huyplb huyplb commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Practical Database Admin (DBA) Sample Workflows (workflowSamples.ts)
    • sample-dba-schema-health-audit: Catalog PRIMARY KEY & secondary index coverage audit over sqlite_master, severity branching, dba_schema_findings persistence, and CSV report export.
    • sample-dba-table-retention-maintenance: Multi-stage retention runbook (archive_before_purge → purge_and_analyze, on: 'success') that archives aged rows + backup CSV before transactional DELETE, ANALYZE, and PRAGMA optimize.
    • sample-dba-ledger-verify-quarantine: Staging ledger verification via transform.verify, clean ledger promotion + currency reconciliation totals, and rejected-row quarantine table + CSV export.
  • Workflow UX & Bug Fixes
    • Separate capsLock state from DOM inputProps in useCapsLock() to eliminate React unknown-prop warnings on password inputs.
    • Fix .canvas-toolbar select/input width overrides (controls.tsx, workflow.css, WorkflowDesigner.tsx) so toolbar pickers and stage controls wrap cleanly instead of clipping or overflowing.
    • Block self-loops and cyclic pipe connections client-side in WorkflowDesigner (wouldCreateCycle()).
    • Commit Inspector Pipe name edits immediately on input change (and trim on blur) so Cmd/Ctrl+S never saves a stale name.
    • Add unsaved workflow change tracking (Unsaved badge + beforeunload warning).
    • Add category filter chips (All, DBA & SQL, Samples, Scheduled / Webhook) and 1-click Run button in WorkflowsPanel.
    • Add Re-run and Open workflow actions in RunsPanel, and include catalog tags in Palette search.
  • Pipe Editor & SQL Editor UX Enhancements
    • SqlPipeEditor: add Format SQL, Expand / Compact height toggle, 1-click DBA templates (+ Catalog Audit, + Row Count Check) and parameter chips (+ {{record.id}}, + {{vars.env}}), plus inline Create table automatically if missing and Run statements in a single transaction checkboxes.
    • Inspector: add transform.script starter snippet pills (+ Map fields, + Filter rows, + Dedupe by ID, + Group / Rollup), Expand / Compact toggle, and Format JSON in raw config view.
    • PipeNode: summarize sink.db.mapped-insert, workflow.sub, and human.gate nodes on the canvas.
    • SqlEditorView: support Cmd/Ctrl+S (Bookmark), Cmd/Ctrl+Shift+F (Format SQL+JS), and Cmd/Ctrl+Shift+S (Safe mode) across the view outside Monaco focus, and add 1-click status-bar split ratio presets (Editor 75%, 50:50, Results 78%).

Verification

  • npm run test-ids
  • cd apps/web && npx tsc --noEmit
  • npm run lint && npm run lint:security
  • npx vitest run on workflow, SQL editor, auth, architecture, naming, and test-ID catalog suites (100 test files, 953 tests passing)

Note

Medium Risk
New engine transform pipes and SQL sink options (transactions, auto-create tables) change how workflow data is written and sanitized; client-side cycle blocking and rerun actions affect designer graph integrity and execution triggers.

Overview
Adds transform.dedupe, transform.aggregate, and transform.redact to the workflow engine (with rejects port on dedupe), registers them in the default catalog, and wires visual inspectors, pipe summaries, and four DBA sample workflows (schema audit, staged retention, quarantine/reconcile, PII dedupe/rollup).

Workflow & SQL UX: SqlPipeEditor gains format/expand controls, DBA SQL templates, parameter tokens, create-table-if-missing, and transaction toggles; the inspector gets script snippets, expandable editors, raw Format JSON, and live pipe-name updates with an Unsaved badge and unload warning; the designer blocks self-links and cycles; the workflows list adds category filters and Run; runs detail adds Open workflow and Re-run.

SQL editor: Status-bar split presets and global Cmd/Ctrl+S / Shift+S / Shift+F shortcuts (outside Monaco).

Auth fix: useCapsLock() now spreads only inputProps so capsLock is not applied as a DOM attribute on password fields.

E2E test IDs and unit tests were extended for the new controls and behaviors.

Reviewed by Cursor Bugbot for commit 9323277. Bugbot is set up for automated code reviews on this repo. Configure here.

…SQL editor UX

- Add 3 practical Database Admin (DBA) sample workflows in workflowSamples.ts:
  - sample-dba-schema-health-audit (catalog PRIMARY KEY & index coverage audit)
  - sample-dba-table-retention-maintenance (staged archive-before-purge + ANALYZE/optimize)
  - sample-dba-ledger-verify-quarantine (staging integrity verify, quarantine & reconciliation)
- Fix workflow & auth UX bugs:
  - Separate capsLock state from DOM inputProps in useCapsLock()
  - Omit w-full in workflow Select/Input when explicit width utility is passed and allow .canvas-toolbar to wrap cleanly
  - Guard against self-loops and cyclic connections in WorkflowDesigner onConnect via wouldCreateCycle()
  - Commit Inspector Pipe name immediately on input change and trim on blur
  - Track unsaved workflow document changes with an Unsaved badge and beforeunload warning
- Enhance Workflow Pipe Editors, Runs/Workflows panels, and SQL Editor UI:
  - Add DBA/Samples/Scheduled category filter chips and 1-click Run button in WorkflowsPanel
  - Add Re-run and Open workflow buttons in RunsPanel detail header
  - Include catalog tags in Palette search filtering
  - Add Format SQL, Expand/Compact toggle, DBA templates, parameter tokens, createTableIfMissing, and transaction controls to SqlPipeEditor
  - Add starter JS transform snippets, Expand/Compact toggle, and raw JSON formatter to Inspector
  - Summarize sink.db.mapped-insert, workflow.sub, and human.gate nodes on canvas
  - Add view-wide Cmd/Ctrl+S, Cmd/Ctrl+Shift+F, and Cmd/Ctrl+Shift+S shortcuts and 1-click Editor/Results split ratio presets in SqlEditorView
- Regenerate test-ID catalog and add unit tests
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Test IDs

Added (29)

  • sql-split-editor-max
  • sql-split-equal
  • sql-split-results-max
  • workflow-aggregate-add-metric
  • workflow-aggregate-as-{…}
  • workflow-aggregate-field-{…}
  • workflow-aggregate-fn-{…}
  • workflow-aggregate-group-by
  • workflow-aggregate-remove-{…}
  • workflow-dedupe-keep
  • workflow-dedupe-keys
  • workflow-designer-unsaved-badge
  • workflow-inspector-format-raw
  • workflow-list-filter-{…}
  • workflow-list-run-{…}
  • workflow-redact-fields
  • workflow-redact-strategy
  • workflow-run-open-workflow
  • workflow-run-rerun
  • workflow-script-expand
  • workflow-script-snippet-{…}
  • workflow-sql-create-table-if-missing
  • workflow-sql-expand
  • workflow-sql-format
  • workflow-sql-insert-record-token
  • workflow-sql-insert-var-token
  • workflow-sql-template-catalog
  • workflow-sql-template-counts
  • workflow-sql-transaction

{…} is a part filled in at run time. The full tree: docs/testing/TEST_IDS.md.

@cursor

cursor Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: f4f3fd27-1656-401d-a3a0-c3c9fad20490)

…s and all-dialect tests

- Add transform.dedupe (DedupePipe), transform.aggregate (AggregatePipe), and transform.redact (RedactPipe) in packages/workflow-engine
- Add dedicated Inspector visual editors, default canvas configs, and PipeNode summaries for the 3 new pipes
- Add sample-dba-pii-redact-dedupe-aggregate DBA workflow sample and include all 4 DBA samples in workflow-samples.test.ts
- Add all-dialects test suites for SQL workflow pipes (14 SQL dialects in sql.test.ts) and SQL Editor (16 dialects in EditorTabBar.test.tsx)
- Regenerate test-ID catalog
@huyplb
huyplb merged commit 73ba1bb into main Nov 25, 2026
12 of 13 checks passed
@huyplb
huyplb deleted the feat/workflow-dba-and-editor-ux branch November 25, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant